/*
 * @Author: your name
 * @Date: 2021-09-10 16:03:28
 * @LastEditTime: 2021-10-08 17:35:39
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \autotestplant_frontend\src\main.js
 */
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
import './assets/css/global.css'  //导入全局样式表
import axios from 'axios'
// import { config } from '_vue@2.6.14@vue/types/umd'


axios.defaults.baseURL = 'http://127.0.0.1:8000/'   //后端开发环境地址
axios.interceptors.request.use(config=> {
  console.log(config)
  config.headers.Authorization = window.sessionStorage.getItem('token')
  // 必须在最后 return config
  return config
})
// axios.defaults.baseURL = 'http://172.18.31.16:8000/'   //后端地址
// axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8'  //配置请求头信息

Vue.prototype.$http = axios   // 配置请求的根路径
Vue.config.productionTip = false



new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
